import React, { Component } from 'react'
import { Card } from 'antd-mobile'
import "./cate.less"
import shop from "../../../../assets/img/16@3x.png"
import { withRouter } from 'react-router-dom'

class cate extends Component {
  render() {
    let { info,reqPre } = this.props
    return (
      <div className='cate'>
        <div>
          <Card title='1重利 新人特价商品专区 （限量供应，先到先得）' onClick={() => { }}>
            {info.map((item) => {
              return (
                <div className='cate_div' key={item.id} onClick={()=>{this. props.history.push("/detail/" + item.id+"/type=1")}}>
                  <img src={reqPre+item.img} alt="" />
                  <div>
                    <div>
                      <p>￥{item.price}</p>
                      <p>￥{item.market_price}</p>
                    </div>
                    <img src={shop} alt="" />
                  </div>
                </div>
              )
            })}
          </Card>
        </div>
      </div>
    )
  }
}

export default withRouter(cate)